package com.chenjun.utils;

import java.io.File;
import java.io.IOException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * 工具类
 * 
 */
public class DateUtils
{
	/**
	 * date相关方法
	 */
	public static Date getNowTime()
	{
		SimpleDateFormat sdf = new SimpleDateFormat("yy-MM-dd-HH-mm-ss");
		Date date = new Date();
		try
		{
			sdf.parse(sdf.format(date));
		}
		catch (ParseException e)
		{
			e.printStackTrace();
		}
		return date;
	}

	public static String getNowTimeStr()
	{
		SimpleDateFormat sdf = new SimpleDateFormat("yy-MM-dd-HH-mm-ss");
		Date date = new Date();
		String dateStr = null;
		dateStr = sdf.format(date);
		return dateStr;
	}

}
